package com.lxj.fast_android_demo.entity;

import java.util.HashMap;
import java.util.List;

/**
 * 数据集
 * 
 * @author LiangXiangJu
 * @creationTime 2014-6-27 下午5:32:35
 * @version
 */
public class DataSet {
	private List<DataElement> elements;
	private List<HashMap<String, Object>> datas;

	/**
	 * 获取行数据
	 * 
	 * @author LiangXiangJu
	 * @creationTime 2014-6-27 下午5:42:34
	 * @version
	 * @param rowIndex
	 * @return
	 */
	public HashMap<String, Object> getRow(int rowIndex) {
		if (null != datas && datas.size() > 0 && rowIndex < datas.size()) {
			return datas.get(rowIndex);
		}
		return null;
	}

	public HashMap<String, Object> newRow() {
		HashMap<String, Object> map = null;
		if (null != elements && elements.size() > 0) {
			map = new HashMap<String, Object>();
			for(DataElement element :elements){
				//map.put(element.getName(), value);
			}
		}
		return map;
	}
}
